﻿<UserControl x:Class="NuGet.Client.VisualStudio.UI.OptionsControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:tp="clr-namespace:Microsoft.VisualStudio.ExtensionsExplorer.UI;assembly=Microsoft.VisualStudio.ExtensionsExplorer.UI"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:resx="clr-namespace:NuGet.Client.VisualStudio.UI.Resources"
             mc:Ignorable="d"
             d:DesignHeight="300" d:DesignWidth="300">
    <UserControl.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="Resources.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
    </UserControl.Resources>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="auto" />
            <RowDefinition Height="8" />
            <RowDefinition Height="auto" />
            <RowDefinition Height="8" />
            <RowDefinition Height="auto" />
        </Grid.RowDefinitions>

        <TextBlock 
            Grid.Row="0"
            FontWeight="Bold"
            Foreground="{DynamicResource {x:Static resx:Brushes.UIText}}"
            Text="{x:Static resx:Resources.Label_InstallationOptions }" />

        <CheckBox 
            Grid.Row="2"
            IsChecked="{Binding Path=Options.ShowPreviewWindow}"
            VerticalContentAlignment="Center"
            Foreground="{DynamicResource {x:Static resx:Brushes.UIText}}"
            Content="{x:Static resx:Resources.Checkbox_ShowPreviewWindow}" />
        
        <!-- install options -->
        <Grid Grid.Row="4" Visibility="{Binding SelectedActionIsInstall,Converter={StaticResource BooleanToVisibilityConverter}}">
            <Grid.RowDefinitions>
                <RowDefinition Height="auto" />
                <RowDefinition Height="8" />
                <RowDefinition Height="auto" />
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="Auto" />
                <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <TextBlock
                Grid.Row="0" Grid.Column="0"
                Margin="0,0,6,0"
                VerticalAlignment="Center"
                Foreground="{DynamicResource {x:Static resx:Brushes.UIText}}"
                Text="{x:Static resx:Resources.Label_DependencyBehavior}"
                />
            <ComboBox
                Grid.Row="0"
                Grid.Column="1"
                HorizontalAlignment="Left"
                MinHeight="22"
                MinWidth="150"
                ItemsSource="{Binding Path=Options.DependencyBehaviors}"
                SelectedItem="{Binding Path=Options.SelectedDependencyBehavior}"
                Style="{StaticResource {ComponentResourceKey TypeInTargetAssembly={x:Type tp:AutomationComboBox}, ResourceId=ThemedComboBoxStyle}}" />

            <TextBlock
                Grid.Row="2" Grid.Column="0"
                Margin="0,0,6,0"
                VerticalAlignment="Center"
                Foreground="{DynamicResource {x:Static resx:Brushes.UIText}}"
                Text="{x:Static resx:Resources.Label_FileConflictAction}" />
            <ComboBox
                Grid.Row="6" Grid.Column="1"
                MinHeight="22"
                MinWidth="150"
                HorizontalAlignment="Left"
                ItemsSource="{Binding Path=Options.FileConflictActions}"
                SelectedItem="{Binding Path=Options.SelectedFileConflictAction}"
                Style="{StaticResource {ComponentResourceKey TypeInTargetAssembly={x:Type tp:AutomationComboBox}, ResourceId=ThemedComboBoxStyle}}" />
        </Grid>
        
        <!-- uninstall options -->
        <Grid Grid.Row="4" Visibility="{Binding SelectedActionIsInstall,Converter={StaticResource InvertedBooleanToVisibilityConverter}}">
            <Grid.RowDefinitions>
                <RowDefinition Height="auto" />
                <RowDefinition Height="8" />
                <RowDefinition Height="auto" />
            </Grid.RowDefinitions>

            <CheckBox 
                Grid.Row="0"
                IsChecked="{Binding Path=Options.RemoveDependencies}"
                VerticalContentAlignment="Center"
                Foreground="{DynamicResource {x:Static resx:Brushes.UIText}}"
                Content="{x:Static resx:Resources.Checkbox_RemoveDependencies}" />

            <CheckBox 
                Grid.Row="3"
                IsChecked="{Binding Path=Options.ForceRemove}"
                VerticalContentAlignment="Center"
                Foreground="{DynamicResource {x:Static resx:Brushes.UIText}}"
                Content="{x:Static resx:Resources.Checkbox_ForceRemove}" />
        </Grid>
    </Grid>
    
    <!--
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="auto" />
            <RowDefinition Height="8" />
            <RowDefinition Height="auto" />
            <RowDefinition Height="8" />
            <RowDefinition Height="auto" />
            <RowDefinition Height="8" />
            <RowDefinition Height="auto" />
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="Auto" />
            <ColumnDefinition />
        </Grid.ColumnDefinitions>
        
        
        
        
        
       
       
    </Grid> -->
</UserControl>